package com.ruoyi.system.domain.module.commonInfo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.JdbcType;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;

/**
 * 跳蚤市场信息对象 flea_info
 *
 * @author ruoyi
 * @date 2021-08-29
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("common_info")
public class CommonInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

	private Integer merId;

    private Integer propertyId;
    /**
     * 所在小区
     */
    private Integer estateId;

    /**
     *  平台自营 0 - 非自营 1 - 自营
     */
    private Integer isPlatform;
	/**
	 *  所在省份
	 */
	private String provName;
	/**
	 *  所在城市
	 */
	private String cityName;

	private Integer provId;
	private Integer	cityId;

    /**
     * 发布人昵称
     */
    private String nickName;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 信息来源 0 - 个人用户 1 - 平台发布
     */
    private Integer infoType;

    /** 信息来源 0 - 个人用户 1 - 平台发布  */
    private String fromType;

    /**  信息标题 */
    private String commonTitle;

    /**
     * 内容信息
     */
	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
    private String content;

    /**
     * 图片
     */
	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
    private String imgUrl;

    /**
     * 添加时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 信息 状态
     */
    private Integer state;

	/**
	 * 已售状态  0 - 未售   1 - 已售
	 */
	private Integer isSale;

    /**
     * 楼房房间号
     */
    private String roomNo;

    private BigDecimal price;

    private BigDecimal oldPrice;

    /**
     * 发布者手机号
     */
    private String sendPhone;

    @TableField(exist = false)
    private List<String> imgUrls;
    /**
     * 修理上传图片
     */
    @TableField(exist = false)
    private List<CommonInfoImg> imgs;

	@TableField(exist = false)
	private String propertyName;

	@TableField(exist = false)
    private String estateName;

    @TableField(exist = false)
    private String imgUrlPaths;

    @TableField(exist = false)
    private String beginDate;

    @TableField(exist = false)
    private String endDate;


    @TableField(exist = false)
    private String faceUrl;
}
